package my.mall.db.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;

/**
 * <p>
 * 订单地址信息表
 * </p>
 *
 * @author fengbo
 * @since 2024-04-22
 */
@TableName("mall_order_address")
class OrderAddress {

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    var id: Long? = null

    /**
     * 数据更新时间
     */
    var updatedTime: LocalDateTime? = null

    /**
     * 数据新建时间
     */
    var createdTime: LocalDateTime? = null

    /**
     * 订单主键
     */
    var orderId: Long? = null

    /**
     * 收货人姓名
     */
    var username: String? = null

    /**
     * 联系电话
     */
    var phoneNum: Long? = null

    /**
     * 省份
     */
    var userProvince: String? = null

    /**
     * 城市
     */
    var userCity: String? = null

    /**
     * 区/县
     */
    var userArea: String? = null

    /**
     * 详细地址
     */
    var userAddress: String? = null

    /**
     * 地址类型 0-收货地址 1-退货地址
     */
    var addressType: Byte? = null

    companion object {

        const val ID : String = "id"


        const val UPDATED_TIME : String = "updated_time"


        const val CREATED_TIME : String = "created_time"


        const val ORDER_ID : String = "order_id"


        const val USERNAME : String = "username"


        const val PHONE_NUM : String = "phone_num"


        const val USER_PROVINCE : String = "user_province"


        const val USER_CITY : String = "user_city"


        const val USER_AREA : String = "user_area"


        const val USER_ADDRESS : String = "user_address"


        const val ADDRESS_TYPE : String = "address_type"

    }

    override fun toString(): String {
        return "OrderAddress{" +
        "id=" + id +
        ", updatedTime=" + updatedTime +
        ", createdTime=" + createdTime +
        ", orderId=" + orderId +
        ", username=" + username +
        ", phoneNum=" + phoneNum +
        ", userProvince=" + userProvince +
        ", userCity=" + userCity +
        ", userArea=" + userArea +
        ", userAddress=" + userAddress +
        ", addressType=" + addressType +
        "}"
    }
}
